// 查找字符串 indexOf

let some:string = "goog ggog study english! lalala";

let study:string = "english";


if(some.indexOf(study) > -1){
  console.log("find the english");
}

console.log(some.indexOf(study), some.lastIndexOf(study));  //找不到 则返回 -1


// 截取字符串 indexOf

console.log(some.substring(8),some.substring(8,16));


// 替换字符串 indexOf

console.log(some.replace('english','chinese'));